package com.stlm2.controller;

import com.stlm2.dems.service.DdmShopService;
import com.stlm2.util.codecontent.CodeContent;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;

/**
 * Created by zlq on 2017/10/18.
 */
@Controller
@RequestMapping("/ddmShopC")
public class DdmShopController {
    @Resource
    private DdmShopService ddmShopService;

    @ResponseBody
    @RequestMapping(value="/getPortalShopList.json",produces="application/json;charset=UTF-8")
    public  String getPortalShopList(String companyCode,ModelMap modelMap,String page){
        String data=null;
        try {
            data=ddmShopService.getPortalShopList(modelMap,page);
        }catch (Exception e){
            e.printStackTrace();
            return  CodeContent.getModelByCode(0,"查询失败",data);
        }
        return  data;
    }

}
